const { compile } = require('./swig')
const { read } = require('./files')

function renderFile(path,data){
    const tempalteStr = read(path)
    const template = compile(tempalteStr)
    return template(data)
}

function renderString(templateStr,data){
    const template = compile(templateStr)
    return template(data)
}

module.exports = {
    renderFile
    , renderString
}